package com.zyc.eduservice.controller;

import com.zyc.commonUtils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author zyc
 * @create 2022-02-14-12:53
 */
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin //解决跨域
public class EduLoginController {

    @PostMapping("login")
    public R login() {
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R info() {
        return R.ok().data("roles","[admin]").data("name","zyc").data("avatar","https://edu-guli-zyc.oss-cn-beijing.aliyuncs.com/2022/02/15/5018file.png");
    }
}
